﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using personalplaner.common.mvvm;

namespace personalplaner.common.controls
{
    public class BaseControl : UserControl
    {
        public BaseControl()
        {
            Loaded += new System.Windows.RoutedEventHandler(BaseControlLoaded);
        }

        void BaseControlLoaded(object sender, System.Windows.RoutedEventArgs e)
        {
            var vm = DataContext as BaseViewModel;
            if (vm == null)
                return;

            vm.Loaded();
        }
    }
}
